package com.edu.zql;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * Created by User on 2017/9/12.
 */
public class asdsadsad {
    static SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
    static SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 8);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        long time = calendar.getTime().getTime();
        System.out.println(sdf2.format(new Date(System.currentTimeMillis())));
        System.out.println(sdf2.format(new Date(time)));
        if (System.currentTimeMillis() < time) {
            System.out.println(1);
        }
        System.out.println(2);

    }
}
